/**
 * Copyright(c): 2018 com.mjduan All rights reserved.
 * 项目名：sofarpcboot-learn
 * 注意：未经作者允许，不得外传
 */
package com.mjudan.project.consumer;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import com.alipay.sofa.runtime.api.annotation.SofaService;
import com.alipay.sofa.runtime.api.annotation.SofaServiceBinding;
import com.mjudan.project.User;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dmj1161859184@126.com 2021-10-17 18:10
 * @version 1.0
 * @since 1.0
 */
@Component
@SofaService(interfaceType = UserRest.class,bindings = @SofaServiceBinding(bindingType = "rest"))
public class UserController implements UserRest{
    @Autowired
    UserConsumer userConsumer;

    @Override
    public User create(){
        return userConsumer.create("jack","street");
    }
}
